package com.crazymaker.springcloud.demo.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigInteger;

@FeignClient(name = "demo-provider")
public interface DemoApi {
    @GetMapping("/api/user/detail/v1")
    ResponseEntity<Object> getUser(@RequestParam(value = "userId", required = true) BigInteger userId);

    @GetMapping("/ZuulFilter/demo")
    ResponseEntity<Object> blackTest(@RequestParam(value = "username", required = false) String username);
}
